package com.xs.designpattern;

import lombok.extern.slf4j.Slf4j;

/**
 * 指挥官访客
 *
 * @author xs
 */
@Slf4j
public class CommanderVisitor implements UnitVisitor {

    @Override
    public void visit(Soldier soldier) {
        // Do nothing
    }

    @Override
    public void visit(Sergeant sergeant) {
        // Do nothing
    }

    /**
     * 指挥官访客方法
     *
     * @param commander 被拜访的指挥官
     */
    @Override
    public void visit(Commander commander) {
        log.info("很高兴见到你 {}", commander);
    }
}
